package com.len.service.impl;

import com.len.base.BaseMapper;
import com.len.base.impl.BaseServiceImpl;
import com.len.entity.BehaviorField;
import com.len.entity.ReportConfig;
import com.len.mapper.ReportConfigMapper;
import com.len.service.ReportConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author songxiangyang
 * @date 2019/03/15.
 */
@Service
public class ReportConfigServiceImpl extends BaseServiceImpl<ReportConfig,String> implements ReportConfigService {

  @Autowired
  private ReportConfigMapper reportConfigMapper;

  @Override
  public BaseMapper<ReportConfig, String> getMappser() {
    return reportConfigMapper;
  }

  @Override
  public int deleteByPrimaryKey(String id) {
    return reportConfigMapper.deleteByPrimaryKey(id);
  }

  @Override
  public int insert(ReportConfig record) {
    record=super.addValue(record,true);
    return reportConfigMapper.insert(record);
  }
  
  @Override
  public ReportConfig selectByPrimaryKey(String id) {
    return reportConfigMapper.selectByPrimaryKey(id);
  }

  @Override
  public int updateByPrimaryKeySelective(ReportConfig record) {
    return reportConfigMapper.updateByPrimaryKeySelective(record);
  }

  @Override
  public int updateByPrimaryKey(ReportConfig record) {
    return reportConfigMapper.updateByPrimaryKey(record);
  }

  @Override
  public List<ReportConfig> selectListByPage(ReportConfig reportConfig) {
    return reportConfigMapper.selectListByPage(reportConfig);
  }

  @Override
  public int selectCountByCondition(BehaviorField behaviorField) {
    return reportConfigMapper.selectCountByCondition(behaviorField);
  }
}
